﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;

namespace DAL
{
    public class ListKey
    {
        private int size;
        public int count
        {
            get { return size; }
        }
        public Key head;
        public Key tail;
        public ListKey()
        {
            size = 0;
            head = null;
            tail = null;
        }
        public void addKey(Key tuMoi)
        {

            if (head == null)
            {
                head = tuMoi;
                tail = tuMoi;
            }
            else
            {
                tail.pNext = tuMoi;
                tail = tuMoi;
            }
            size++;

        }
        public bool delKey()
        {
            while (head != null)
            {

                head = head.pNext;
                
            }
            size = 0;
            return true;
        }

    }
}
